//
//  SimulationFinishVC.m
//  ATAInterview
//
//  Created by up72-17 on 2018/12/12.
//  Copyright © 2018 up72-17. All rights reserved.
//

#import "SimulationFinishVC.h"

@interface SimulationFinishVC ()

@end

@implementation SimulationFinishVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}

- (IBAction)backButtonAction:(id)sender {
    [self.navigationController popViewControllerAnimated:YES];
}




- (IBAction)buttonAction:(UIButton *)sender {
    if ([sender tag] == 0) {//正式面试
        [[GlobalData sharedGlobalData] setIsSimulation:NO];
        InterviewDescriptionVC *interview = [[InterviewDescriptionVC alloc] init];
        [self.navigationController pushViewController:interview animated:YES];
    } else if ([sender tag] == 1) {//再次练习
        [[GlobalData sharedGlobalData] setQuestionIndex:0];
        AudioQuestionsVC *audioQuestions = [[AudioQuestionsVC alloc] init];
        [self.navigationController pushViewController:audioQuestions animated:YES];
    } else if ([sender tag] == 2) {//回首页
        NSArray *temp = self.navigationController.viewControllers;
        for (NSInteger i = 0; i < [temp count]; i++) {
            id tempvc = [temp objectAtIndex:i];
            if ([tempvc isKindOfClass:[MainVC class]]) {
                [self.navigationController popToViewController:tempvc animated:YES];
                return;
            }
        }
    }
    
}



@end
